﻿using System.Collections.Generic;

namespace Core.Interfaces
{
    public interface IConnection
    {
        void ConfigureConnection(string  serverUrl, string databaseName,string user,string password);
        string ServerUrl { get; }
        string DatabaseName { get; }
        bool OpenConnection();
        IEnumerable<object[]> ExecuteSelectQuery<T>(string query,bool isLazy);
        IEnumerable<object[]> ExecuteSelectQuery(string query, byte colcount);
        string SelectQuery<T>(string tableName,string parameters,bool isLazy = false);
        string InsertQuery(string tableName, Dictionary<string, string> values);
        string UpdateQuery(string tableName, IEnumerable<KeyValuePair<string, string>> columnValuePair, string whereStatement);
        void CreateSchema(string nameOfSchema);
        void ExecuteQuery(string query);

        string DeleteQuery(string TableName, List<KeyValuePair<string, string>> pk);
        void CloseConnection();
    }
}
